namespace Home.Domain.Migrations
{
    using System.Data.Entity.Migrations;
    
    public partial class data1 : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("UserInfo", "Salesman_Id", "Salesman");
            DropIndex("UserInfo", new[] { "Salesman_Id" });
            AddColumn("UserInfo", "Code", c => c.String());
            AlterColumn("PNews", "Title", c => c.String());
            AlterColumn("UserInfo", "CreateDate", c => c.DateTime(nullable: false));
            DropColumn("UserInfo", "LoginDate");
            DropColumn("UserInfo", "Salesman_Id");
        }
        
        public override void Down()
        {
            AddColumn("UserInfo", "Salesman_Id", c => c.Int());
            AddColumn("UserInfo", "LoginDate", c => c.DateTime());
            AlterColumn("UserInfo", "CreateDate", c => c.DateTime());
            AlterColumn("PNews", "Title", c => c.String(nullable: false));
            DropColumn("UserInfo", "Code");
            CreateIndex("UserInfo", "Salesman_Id");
            AddForeignKey("UserInfo", "Salesman_Id", "Salesman", "Id");
        }
    }
}
